﻿using System;

namespace Gp.Scripts.Core {
    public enum UnitAnimEventType {
        /// <summary>
        /// 攻击命中事件
        /// </summary>
        AttackHitEvent,
        
        /// <summary>
        /// 攻击位移开始事件
        /// </summary>
        AttackMoveStartEvent,
        
        
        // AttackMoveBackEvent,
        
        WeaponTakeOut,
        
        /// <summary>
        /// 拖尾开启
        /// </summary>
        TrailEffectActivate,
        
        /// <summary>
        /// 拖尾关闭
        /// </summary>
        TrailEffectDeactivate,
    }

    
    
    public static class UnitAnimEventTypeExtend {
        public static string EventName(this UnitAnimEventType type) {
            return type switch {
                UnitAnimEventType.AttackHitEvent => "AttackHit",
                UnitAnimEventType.AttackMoveStartEvent => "AttackMoveStart",
                UnitAnimEventType.WeaponTakeOut => "WeaponTakeOut",
                UnitAnimEventType.TrailEffectActivate => "TrailEffectActivate",
                UnitAnimEventType.TrailEffectDeactivate => "TrailEffectDeactivate",
                _ => throw new ArgumentException("缺少配置")
            };
        }
    }
}